////////////////////////////////////////////////////////////////////////////////
// Copyright (c) 2011-2012 www.iflytek.com. All Rights Reserved.
//  This software for customer relationship management system, developed by Iflytek_ZY team.
//  Software code and design for the team, copy rights reserved.
////////////////////////////////////////////////////////////////////////////////

package com.iflytek.ci.qams.dao;

import java.util.List;
import java.util.Map;

import com.iflytek.ci.qams.domain.Action;
import com.iflytek.framework.mybatis.extra.MyBatisDao;

/**
 * <p>
 * Issue_action's interface for database visit
 * </p>
 * To change this template use File | Settings | File Templates.
 */
@MyBatisDao
public interface ActionDao {
	/**
	 * Search issue_actions by id
	 * 
	 * @param long issue_action_id
	 * @return issue_action
	 */
	Action getById(long id);

	/**
	 * Search issue_actions by issue_id
	 * 
	 * @param long issue_id
	 * @return issue_action
	 */
	List<Action> getByIssue_Id(long issue_id);

	/**
	 * Add a new issue_action
	 * 
	 * @param issue_action
	 *            issue_action's information
	 * @return 
	 */
	int add_issue_action(Action issue_action);

	/**
	 * Delete the issue_actions by issue and id
	 * 
	 * @param params
	 *            query condition Map key issue:issue's id id : issue_action's
	 *            id
	 */
	int delete_issue_action(Map<String, Object> params);

	/**
	 * update issue_action
	 * 
	 * @param issue_id
	 */
	int update_issue_action(Action action);
	
	/**
	 * 获取最后插入数据库的数据id
	 * @return
	 *    新增数据的id值
	 */
	int last_id();
}
